package com.stellar.auth.basic.service.impl;

import com.stellar.auth.basic.dao.AuthUserDao;
import com.stellar.auth.basic.entity.AuthUser;
import com.stellar.auth.basic.service.AuthUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 系统用户信息表(AuthUser)服务实现
 *
 * @author Jqchan
 * @since 2025-05-16 18:05:27
 */
@Service
public class AuthUserServiceImpl implements AuthUserService {

    @Resource
    private AuthUserDao authUserDao;

    @Override
    public AuthUser queryById(Long id) {
        return authUserDao.queryById(id);
    }

    @Override
    public AuthUser queryByCondition(AuthUser condition) {
        return authUserDao.queryByCondition(condition);
    }

    @Override
    public List<AuthUser> queryAllByCondition(AuthUser condition) {
        return authUserDao.queryAllByCondition(condition);
    }

    @Override
    public List<AuthUser> page(AuthUser condition, int page, int pageSize) {
        return authUserDao.page(condition, page, pageSize);
    }

    @Override
    public AuthUser insert(AuthUser entity) {
        authUserDao.insert(entity);
        return this.queryById(entity.getId());
    }

    @Override
    public int update(AuthUser entity) {
        return authUserDao.update(entity);
    }

    @Override
    public int deleteById(Long id) {
        return authUserDao.deleteById(id);
    }

    @Override
    public Long count(AuthUser condition) {
        return authUserDao.count(condition);
    }

    @Override
    public AuthUser queryByOpenId(String openid) {
        return authUserDao.queryByOpenId(openid);
    }

    @Override
    public List<AuthUser> batchQueryByIds(List<Long> ids) {
        return authUserDao.batchQueryByIds(ids);
    }
}
